package com.lxd.common.exception;

import com.lxd.common.enums.ExceptionEnums;
import lombok.Getter;

/**
 * @Author Dongdong
 * @注释
 */
@Getter
public class ApiException extends RuntimeException{
    private Integer code;

   public ApiException(String msg,Integer code){
       super(msg);
       this.code=code;
   }
    public ApiException(ExceptionEnums enums) {
        super(enums.getMsg());
        this.code = enums.getCode();
    }


}
